{extend name="layout" /}
{block name="content"}
<div class="mui-content">
	<div class="">
		<div class="mui-table-view line-height-xsmall">
			<div class="mui-table-view-cell mui-media">
				<a href="">
					<div class="mui-table ">
						<div class="mui-table-cell uk-text-middle">
							<img class="uk-border-circle mui-pull-left uk-margin-xsmall-right" src="{$info.avatar}" width="42" height="42">
							<div class="mui-media-body">
								<div class="mui-ellipsis">
									<span class="mui-pull-right uk-text-small">{$info.addtime}</span>
									<span>{$info.nickname}</span>
								</div>
								<div class="mui-ellipsis uk-text-muted">
									<span class="uk-margin-small-right">{$info.title}</span>
								</div>
							</div>
						</div>
					</div>	 
				</a>
			</div>
		</div>
		<div class="tm-panel tm-padded ">
			<form id="formid">
			<div class="uk-margin uk-text-center">
				<div class="uk-text-medium uk-margin-xsmall-bottom">评分</div>
				<div>
					<div class="tm-starsbox" id="default-demo" data-score="{$evasinfo.score | default = '5'}">
					</div>
				</div>
			</div>
			<input type="hidden" value="{$userid}" name="contentid">
			<input type="hidden" value="{$typeid}" name="typeid">
			<input type="hidden" value="{$info.id}" name="requiresid">
			<div class="uk-margin uk-margin-bottom-remove">
				<textarea name="content" rows="4" placeholder="其他想说的" {eq name="isnull" value='0'} readonly {/eq}>{$evasinfo.content}</textarea>
			</div>
			</form>
		</div>
	</div>
	{eq name="isnull" value='1'}
	<div class="tm-padded-smedium">
		<a class="mui-btn mui-btn-danger mui-btn-block cocoPostFormAjax" href="Javascript:" ajaxurl="{:url('/v1/evas/add')}" formid="formid" ajax-callback="suc_back">
			提交
		</a>
	</div>
	{/eq}
</div>
{/block}
{block name="script"}
<script src="{$js_path}jquery.raty.min.js"></script>
<script type="text/javascript">
	function suc_back (obj, data) {
		coco_alert('评价成功', function () {
			coco_close_window();
		})
	}
</script>
<script>
	$(function() {
		$.fn.raty.defaults.path = '{$images_path}star3';
		$('#default-demo').raty({
			size: 24,
			score: function() {
				return $(this).attr('data-score');
			},
			readOnly: {$isnull} ? '' : true,
		});
	});
</script>
{/block}